<template>
  <div class="table">
    <a-table
      :columns="columns"
      :dataSource="dataSource"
      :loading="loading"
      :pagination="false"
      bordered
    >
      <span slot="action" slot-scope="text">
        <slot name="operate" :text="text">
        </slot>
      </span>
    </a-table>
  </div>
</template>
<script>
export default {
  data () {
    return {
      message: 'bao'
    }
  },
  props: {
    columns: {
      type: Array,
      default: () => {
        return []
      }
    },
    dataSource: {
      type: Array,
      default: () => {
        return []
      }
    },
    loading: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    handleEdit (text) {
      this.$emit('handleEdit', text)
    }
  }
}
</script>
<style lang="scss" scoped>
.table {
  background: #fff;
}
</style>
